﻿using DeviceMaintainGIS.BLL.Document;
using DeviceMaintainGIS.Model;
using DeviceMaintainGIS.Model.Document;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace DeviceMaintainGIS.Controllers
{
    /// <summary>
    /// 资料
    /// </summary>
    public class DocumentController : ApiController
    {

        /// <summary>
        /// 根据设备、项目、基站查询资料信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        // POST: api/Document
        public ReturnListVM<DocumentModel> Get([FromUri]DocumentExtendRequest request)
        {
            return new DocumentService().GetDocumentExtendList(request);
        }

        /// <summary>
        /// 根据条件查询资料列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        // POST: api/Document
        public ReturnListVM<DocumentModel> Post(DocumentRequest request)
        {
            return new DocumentService().GetDocumentList(request);
        }

    }
}
